
package com.verify.repository;

import com.baomidou.mybatisplus.extension.service.IService;
import com.verify.data.domain.DeterminePost;
import com.verify.data.domain.JobType;
import com.verify.data.domain.PersonInfo;
import com.verify.mapper.JobTypeMapper;
import com.verify.mapper.PersonInfoMapper;
import com.verify.repository.base.BaseRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class PersonInfoRepository extends BaseRepository<PersonInfoMapper, PersonInfo>
        implements IService<PersonInfo> {

    public List<PersonInfo> listByOrgCode(String orgCode) {
        return list(baseQuery().eq(PersonInfo::getOrgCode, orgCode));
    }

    public List<PersonInfo> listByName(String name, String orgCode) {
        return list(baseQuery().eq(PersonInfo::getName, name).eq(PersonInfo::getOrgCode, orgCode));

    }
}
